=== TEST assign_closure ===
myfunc = (project) -> {

  class MyClass(IConfigurable):
    def __init__(self, task_name):
      self.task_name = task_name
      self.data_files = None
    def configure(self, closure):
      closure.apply(self)
      project.task(self.task_name) {
        do_last {
          print self.task_name, self.data_files
        }
      }

  project.add_extension('mytask', MyClass)
}
=== EXPECTS ===
def _closure_1(project):


    class MyClass(IConfigurable):

        def __init__(self, task_name):
            self.task_name = task_name
            self.data_files = None

        def configure(self, closure):
            closure.apply(self)

            def _closure_1_closure_1(self, *arguments, **kwarguments):

                def _closure_1_closure_1_closure_1_closure_1(self, *
                    arguments, **kwarguments):
                    print(self.task_name, self.data_files)
                do_last(_closure_1_closure_1_closure_1_closure_1)
            project.task(self.task_name)(_closure_1_closure_1)
    project.add_extension('mytask', MyClass)


myfunc = _closure_1
=== END ===
